package com.captjack.micro.service.hello.impl;

import com.captjack.micro.api.hello.MicroServiceOne;
import com.captjack.micro.dao.database.mapper.SysDictMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.UUID;

/**
 * @author Capt Jack
 * @date 2018/6/20
 */
@RestController
public class MicroServiceOneImpl implements MicroServiceOne {

    /**
     *
     */
    private static final String NODE_ID = UUID.randomUUID().toString();

    /**
     *
     */
    private final SysDictMapper sysDictMapper;

    @Override
    public String service(int num1, int num2) {
        System.out.println(MicroServiceOne.SERVICE_URL);
        System.out.println(sysDictMapper.selectMaps(null).toString());
        return NODE_ID;
    }

    @Autowired
    public MicroServiceOneImpl(SysDictMapper sysDictMapper) {
        this.sysDictMapper = sysDictMapper;
    }

}
